package com.landinfo.repository;

import com.landinfo.domain.BookMark;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * Spring Data JPA repository for the BookMark entity.
 */
@SuppressWarnings("unused")
public interface BookMarkRepository extends JpaRepository<BookMark,String> {

    @Query("select bookMark from BookMark bookMark where bookMark.user.login =  ?1")
    List<BookMark> findByUserIsCurrentUser(String loginName);

}
